package com.example.lvsuo.modal;

import java.util.HashMap;

public class Result extends HashMap<String,Object> {

    public static Result back(String message, Object o){
        Result r=new Result();
        r.put("status",Constant.SUCCESS.getValue());
        r.put("message",message);
        r.put("data",o);
        return r;
    }
    public static Result back(String status,String message,Object o){
        Result r=new Result();
        r.put("status",status);
        r.put("message",message);
        r.put("data",o);
        return r;
    }
    public static Result back(Object o){
        Result r=new Result();
        r.put("status",Constant.SUCCESS.getValue());
        r.put("message",Constant.MESSAGE.getValue());
        r.put("data",o);
        return r;
    }
}
